﻿<!DOCTYPE html><!--HTML5 doctype-->
<html>
<head>
<title>Table控件</title>
<meta http-equiv="Content-type" content="text/html; charset=utf-8"> 
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<!--<meta name="viewport" content="target-densitydpi=device-dpi, width=device-width, initial-scale=no" />-->
<meta name="apple-mobile-web-app-capable" content="yes" />
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<link rel="stylesheet"  type="text/css" href="../kitchensink/android.css" title="frosty"/>
<link rel="stylesheet"  type="text/css" href="../kitchensink/iphone.css" title="frosty"/>
<link rel="stylesheet" type="text/css" href="../res/js/tab/mawTab.css"/>
<script type="text/javascript" charset="utf-8" src="../jq.mobi.js"></script> 
<script type="text/javascript" charset="utf-8" src="../ui/jq.ui.js"></script>
<script type="text/javascript" charset="utf-8" src="../plugins/hs.notification.js?d"></script>
</head>
<body>
	
<!--	<span href="#" class="abox_message">
        <div class="message_box">
        	<a href="#">
            <div class="mes_logo"><span>logo</span></div>
            <div class="message">
                <span class="mes_tt">消息提醒</span>
                <span class="mes_ct">您有<b>(2)</b>条新消息</span>
            </div>     
          </a>     
        </div>
   </span>-->
   
	
  
	<header class="headerbar" >
            <a href="javascript:$.ui.goBack();"><div class=" icon_back"></div></a>
            <div class="item flex"><h1></h1></div>
            <a href="#"><div class=" icon_set"></div></a>
    </header>
         <!--   <h2>新建销售机会</h2>-->       
         	<div id="mawTabFirst" class="maw_tabs">
				<div class="tab_bg" >
                   <div>
                    <a href="#" class="tab_focus" data-name="tab" data-index="0" onclick="showTab(0)">必填</a>
                    <a href="#" data-name="tab" data-index="1" onclick="showTab(1)">选填</a>
                   </div>
				</div>
				<div style="clear:both;"></div>
				<div class="tabDiv" id="tabDiv_0">
                  <table class="table_form" cellpadding="0" cellspacing="0">
                      <tr>
                        <td width="30%">
                          <label for="流程编号" >流程编号</label></td>
                          <td><input type="text" id="流程编号" class="jq-ui-forms" /></td>
                      </tr>
                      <tr><td>
                          <label for="流程名称" class="selected">流程名称</label></td>
                          <td><input type="text" id="流程名称" class="jq-ui-forms"/></td>
                       </tr>
                      <tr><td>
                          <label for="流程类型" class="selected">流程类型</label></td>
                          <td><input type="text" id="流程类型" class="jq-ui-forms"/></td>
                      </tr>
                      <tr><td>
                          <label for="创建人" class="selected">创建人</label></td>
                          <td><input type="text" id="创建人" class="jq-ui-forms"/></td>
                      </tr>
                  </table>
				</div>
				<div class="hidden tabDiv" id="tabDiv_1">
					高级搜索
				</div>
			</div>
                <div class="new_creat">
                <table class="table_normal" id='tb_product'>
                 <caption><span>产品明细</span><span><a href="" class="icon_add" id='product_add' data-ignore="true"></a></span><span><a href="" class="icon_delete" id='product_del' data-ignore="true"></a></span></caption>
                    <thead>
                        <tr>
                            <td class="ness">产品线</td>
                            <td class="ness">销售产品</td>
                            <td class="ness">技术产品</td>
                            <td >预计单价（万元）</td>
                            <td >数量</td>
                            <td class="ness">预计金额（万元）</td>
                            <td >备注</td>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td><span></span><input type="checkbox"  class="jq-ui-forms"/><label></label></td>
                            <td><button class="btn_search"></button></td>
                            <td><input type="input"  class="jq-ui-forms"/></td>
                            <td><input type="input"  class="jq-ui-forms"/></td>
                            <td>0.00</td>
                            <td></td>
                            <td><input type="input"  class="jq-ui-forms"/></td>
                        </tr> 
                    </tbody>
                </table>
                <div class="table_normal_box">
                    <table class="table_normal"> 
                        <caption><span>客户决策团队</span><span><a href="" class="icon_add"></a></span><span><a href="" class="icon_delete"></a></span></caption>
                        <thead>
                            <tr>
                                <td>联系人</td>
                                <td>部门</td>
                                <td>职务</td>
                                <td>购买角色</td>
                                <td>对我方态度</td>
                                <td>交往程度</td>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td><input type="checkbox"  class="jq-ui-forms"/><label></label><button class="btn_search"></button></td>
                                <td></td>
                                <td></td>
                                <td>
                                    <select class="select-ui-forms">    
                                    </select>
                                    <label></label>
                                </td>
                                <td>
                                <select class='jq-ui-forms select-ui-forms'>
                                	<option>11</option>
                                    <option>22</option>
                                </select>
                                </td>
                                <td><select class='jq-ui-forms select-ui-forms'></select></td>
                            </tr>
                        </tbody>
                    </table>
                </div>
                <div class="table_normal_box">
                    <table class="table_normal"> 
                        <caption>我方优势</caption>
                        <thead>
                            <tr>
                                <td>我方优势</td>
                                <td>我方弱势</td>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td><textarea name="" class="jq-ui-forms ui-forms" ></textarea></td>
                                <td><textarea name="" class="jq-ui-forms ui-forms" ></textarea></td>
                            </tr>  
                        </tbody>
                    </table>
                </div>
                <div class="table_normal_box">
                    <table class="table_normal"> 
                        <caption>竞争对手分析</caption>
                        <thead>
                            <tr>
                                <td>竞争对手</td>
                                <td>解决方案</td>
                                <td>在客户内部的关键人</td>
                                <td>优势</td>
                                <td>弱势</td>
                                <td>可能的策略</td>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td><input type="checkbox"  class="jq-ui-forms"/><label></label><button class="btn_search"></button></td>
                                <td><textarea name="" class="jq-ui-forms ui-forms" ></textarea></td>
                                <td><textarea name="" class="jq-ui-forms ui-forms" ></textarea></td>
                                <td><textarea name="" class="jq-ui-forms ui-forms" ></textarea></td>
                                <td><textarea name="" class="jq-ui-forms ui-forms" ></textarea></td>
                                <td><textarea name="" class="jq-ui-forms ui-forms" ></textarea></td>
                            </tr>  
                        </tbody>
                    </table>
                </div>
            </div>
        </div>

<script type="text/javascript" >
	$.ui.ready(function(){
		var count = 0;
		function product_addHandler(){
			//console.log('sldfk');
			count++;
			var newRow = ['<input type="checkbox"  class="jq-ui-forms"/><label></label>','<button class="btn_search"></button>','<input type="input"  class="jq-ui-forms"/>','<input type="input"  class="jq-ui-forms"/>','0.00','row_'+count,'<input type="input"  class="jq-ui-forms"/>'];
			$('#tb_product').children('tbody').addRow(newRow);
			return false;//必不可少
		}
		
		function product_delHandler(){
			var len = $('#tb_product').children('tbody').countRow();
			console.log('len before:'+len);
			var index = 0;
			if(len > 0){
				index = len-1;
			}
			
			console.log($('#tb_product').children('tbody').row(0));
			$('#tb_product').children('tbody').removeRow(0);
			len = $('#tb_product').children('tbody').countRow();
			console.log('len after:'+len);
			return false;
		}
		
		
		
		$("#product_del").bind('click',product_delHandler);
		$("#product_add").bind('click',product_addHandler);
		
		$("#product_del").bind('click',product_delHandler);
		$("#product_add").bind('click',product_addHandler);
		
		NotiBar.init();
	 	NotiBar.startup();
 
			NotiBar.addMessage({
				stayDuration:3000,
				toggleable:true,
				content:"会议通知1",
 
			});
	   
		//NotiBar.show();
		
		NotiBar.addMessage({
				stayDuration:3000,
				toggleable:true,
				content:"会议通知2",
		 
			});
			
			//NotiBar.show();
	});
	

</script>

</body>
</html>
